enforcement-time

application-policy

Configures an enforcement time period in days and hours for this application policy. The enforcement time is applicable only to those rules, within the application policy, that do not have a schedule policy associated. By default an application policy is enforced on all days.

Note

Note

Schedule policies are a means of enforcing allow/deny/mark/rate-limit rules at different time periods. If no schedule policy is applied, all rules within an application policy are enforced at the time specified using this enforcement-time command. For more information on configuring a schedule policy, see schedule-policy.

Supported in the following platforms:

Syntax

enforcement-time days [sunday|monday|tuesday|wednesday|thursday|friday|saturday|all|weekends|weekdays] {start-time <HH:MM> end-time <HH:MM>}

Parameters

enforcement-time days [sunday|monday|tuesday|wednesday|thursday|friday|saturday|all|
weekends|weekdays] {start-time <HH:MM> end-time <HH:MM>}
enforcement-time days Enforces this application policy on only on the days specified here
  • sunday – Enforces the policy only on Sundays
  • monday – Enforces the policy only on Mondays
  • tuesday – Enforces the policy only on Tuesdays
  • wednesday – Enforces the policy only on Wednesdays
  • thursday – Enforces the policy only on Thursdays
  • friday – Enforces the policy only on Fridays
  • saturday – Enforces the policy only on Saturdays
  • all – Enforces the policy on all days. This is the default setting.
  • weekends – Enforces the policy only on weekends
  • weekdays – Enforces the policy only on weekdays

In case no enforcement time is specified, the application policy is enforced on all days (i.e., always active).

If using schedule policies with the allow/deny/mark/rate-limit rules, the best practice would be to keep the application policy active at all time (i.e., retain the default enforcement-time setting of ‘all‘).

start-time <HH:MM> end-time <HH:MM> Optional. Configures this application policy‘s enforcement period
  • start-time – Configures the start time. This is the time at which the application policy enforcement begins.
  • end-time – Configures the end time. This is the time at which the application policy enforcement ends.
    • <HH:MM> – Specify the start and end time in the HH:MM format.

Examples

nx9500-6C8809(config-app-policy-Bing)#enforcement-time days weekdays start-time 10:30 end-time 20:00
nx9500-6C8809(config-app-policy-Bing)#show context
application-policy Bing
 description "This application policy allows Bing search engine packets"
 enforcement-time days weekdays start-time 10:30 end-time 20:00
 allow application Bing precedence 1
 allow app-category business precedence 2
 deny app-category "social networking" precedence 3
nx9500-6C8809(config-app-policy-Bing)#

Related Commands

no Removes this application policy‘s enforcement period